#ifndef LAYOUTGENOMEELEMENTS_H
#define LAYOUTGENOMEELEMENTS_H

#include <QObject>
#include <QList>
#include <QPointer>
#include <QDebug>

#include "../../VisBaseClasses/visbaselayout.h"
#include "genomeelement.h"

class VisBaseElement;

class LayoutGenomeElements : public VisBaseLayout
{
    Q_OBJECT
public:
    LayoutGenomeElements(QObject *parent = 0);
    LayoutGenomeElements(QList< QPointer< VisBaseElement > > elements, QObject *parent = 0);
    //LayoutGenomeElements( const LayoutGenomeElements& other );
    
    void setStartNt(int startNt);
    void setStopNt(int stopNt);
    void setStartX(int startX);
    void setStopX(int stopX);
    void setNtPerPixel(float ntPerPixel);

signals:
    void trackProgress(int stepsComplete);
    void finished();
    void error( QString err );

public slots:
    void process();

private:
    void init();
    int map(int nt);

    GenomeElement* getGenomeElement(int i);

    int startNt;
    int stopNt;
    int startX;
    int stopX;

};

#endif // LAYOUTGENOMEELEMENTS_H
